package com.example.demo.service;

import java.util.ArrayList;
import java.util.List;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import com.example.demo.entity.UserInfo;
@Slf4j
@Service
public class UserService {

     public List<UserInfo> getUserInfo(List<String> userIds ) {
         log.info("getUserInfo={}",userIds);
        List<UserInfo> userInfos = new ArrayList<>();

        /*
         * 请在此处实现获取用户信息的业务逻辑
         */

        for (String userId : userIds) {
            UserInfo userInfo = new UserInfo();
            userInfo.setId(userId);
            userInfo.setName("用户" + userId);
            userInfo.setAvatarUrl("https://img12.360buyimg.com/imagetools/jfs/t1/38589/24/19959/21396/634d0584E6f5c4759/9ef960f4d530db1c.png");
            userInfos.add(userInfo);
        }

        return userInfos;
     }
}
